<!--{template common/header_simple_start}-->
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
  <div class="bs-left-container  clearfix"> 
    <!--{template left}--> 
  </div>
  <div class="left-drager">
    <div class="left-drager-op">
      <div class="left-drager-sub"></div>
    </div>
  </div>
  <div class="bs-main-container  clearfix">
    <div class="main-header clearfix"> 
      <ul class="nav nav-pills"  >
        <li class="nav-item"> <a class="nav-link" href="{BASESCRIPT}?mod=cloud&op=edit&bz=dzz"> {lang set}</a> </li>
        <li class="nav-item"> <a class="nav-link" href="{BASESCRIPT}?mod=cloud&op=router">{lang routing_management}</a> </li>
        <li class="nav-item"> <a class="nav-link active" href="{BASESCRIPT}?mod=cloud&op=rootedit">{lang add_routing}</a> </li>
      </ul>
    </div>
    <div class="main-content">
        <div class="col-md-12">
          <form id="cpform" action="{BASESCRIPT}?mod=cloud&op=routeredit" class="form-horizontal form-horizontal-left" method="post" name="cpform">
            <input type="hidden" value="{FORMHASH}" name="formhash">
            <input type="hidden" name="routerid" value="$routerid">
            <input type="hidden" value="addroutersubmit" name="true">
            <div class="row mb-3">
              <label class="col-sm-2">{lang routing_name}</label>
              <div class="col-sm-10">
                <input type="text" name="router[name]" class="form-control" value="$router[name]">
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang priority}</label>
              <div class="col-sm-10">
                <input type="text" name="router[priority]" class="form-control" value="$router[priority]">
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang storage_location}</label>
              <div class="col-sm-10">
                <select name="router[remoteid]" class="form-select">
                  <!--{loop $spaces $value}--> 
                  <option value="$value[remoteid]" <!--{if $router[remoteid]==$value[remoteid]}-->selected="selected"<!--{/if}-->> $value[name]
                    <!--{if $value[available]<1}-->（{lang router_routing_failure}）<!--{/if}-->
                  </option>
                  <!--{/loop}-->
                </select>
                <ul class="help-block ">
                  <li>{lang cloud_movetool_designator_text}</li>
                </ul>
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang file_type}</label>
              <div class="col-sm-10">
                <textarea type="textarea" id="exts" class="form-control" name="router[router][exts]" row="6" cols="6">{eval echo implode(',',$router[router][exts])}</textarea>
                <a href="javascript:;" onclick="setExts('jpg,jpeg,png,gif')">{lang photograph_class}</a> 
                &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('doc,docx,rtf,odt,htm,html,txt')">word{lang type_attach}</a> 
                &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('xls,xlsx,ods,sxc,csv,tsv')">excel{lang type_attach}</a> 
                &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('ppt,pptx,pps,ppsx,odp,sxi')">ppt{lang type_attach}</a> 
                &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('mp4,avi,wmv,mkv,rmvb,rm,asf,mpg,mpeg,mov')">{lang video_typename_attach}</a> &nbsp;&nbsp; <a href="javascript:;" onclick="setExts('txt,ini,conf,log,bat,sql,js,css,htm,html,xml,asp,aspx,php,jsp,json,py,h,c')">{lang text_class}</a> 
                <ul class="help-inline ">
                  {lang cloud_movetool_file_type_text}
                </ul>
              </div>
            </div>
            <div class="row mb-3">
              <label class="col-sm-2">{lang file_size}</label>
              <div class="col-sm-10">
								<div class="row g-3">
                  <div class="col">
                    <input type="text" class="form-control" placeholder="{lang typename_attach_gt}" name="router[router][size][lt]" value="">
                  </div>M
                  <div class="col">
                    <input type="text" class="form-control" placeholder="{lang typename_attach_lt}" name="router[router][size][gt]" value="">
                  </div>M
                </div>
              </div>
              <div class="col-sm-10">
                <ul class="help-block ">
                  {lang cloud_movetool_file_size_text}
                </ul>
              </div>
            </div>
            <dl>
              <input class="btn btn-primary" name="addroutersubmit" value="<!--{if $routerid}-->{lang edit}<!--{else}-->{lang add}<!--{/if}-->" type="submit">
            </dl>
          </form>
        </div>
  </div>
</div>
<script type="text/javascript">
	function setExts(str) {
		var old = trim(document.getElementById('exts').value).replace(/，{1,}/g, ',').replace(/,{1,}/g, ',').replace(/^\,/g, '');
		var arr = old ? old.split(',') : [];
		var newarr = str.split(',');
		for(var i = 0; i < newarr.length; i++) {
			if(jQuery.inArray(newarr[i], arr) < 0) {
				arr.push(newarr[i]);
			}
		}
		document.getElementById('exts').value = arr.join(',');
	}
</script> 
<!--{template common/footer_simple}-->